Skip to content

feat(ticks): Accept numbers for showTicks/showTicksValues #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2016

Conversation

ValentinH
Copy link
Member

@ValentinH ValentinH commented Feb 13, 2016

Thanks to this feature, you can display ticks at intermediate positions without setting a fixed step.
As requested in #259.
Demo: http://jsfiddle.net/xaa0qox1/

A few problems found so far:

  • clicking on a tick should set the slider value exactly to the tick value
  • clicking on a tick value should set the slider value exactly to the tick value
  • when using showTicksValues, the pointer label is hidden and so we don't really know the current value. This is because when the showTicks* options were only boolean, the labels were useless since they were replaced by the ticks values.
  • complete unit tests

@codecov-io
Copy link

Current coverage is 100.00%

Merging #264 into master will not affect coverage as of a00ba6c

@@            master    #264   diff @@
======================================
  Files            1       1       
  Stmts          701     713    +12
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            701     713    +12
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of a00ba6c

Powered by Codecov. Updated on successful CI builds.

@lookfirst
Copy link

Nice work!

The UX that I've seen used elsewhere is a bit different. The tick value is below and the slider tick value is shown above as it is dragged. It hides when the mouse is not over it.

http://take.ms/aenJI - with the mouse over the slider (shows the value above)
http://take.ms/zbbhu - hidden when the mouse is not over the slider

I can also click on the values below the line to set the slider value.

@ValentinH
Copy link
Member Author

In my opinion, hiding the value when the mouse is not on the slider is not an option since it is important for the slider to be fully understandable without any additional widgets.

Thanks to CSS, ticks can already been set on the bottom but the slider need to work properly for ticks with top and bottom.

@lookfirst
Copy link

Sure, I agree with you - I don't like hidden UX.

@ValentinH
Copy link
Member Author

@lookfirst I have updated the demo and add handling for showTicksValues. Can I get your feedback please?

@lookfirst
Copy link

👍

@ValentinH
Copy link
Member Author

Ok then I just need to complete to unit tests.

@johnsheldon
Copy link

Any ETA for the release which contains this feature? We just so happened to need it and saw it was being implemented.

@ValentinH
Copy link
Member Author

Normally, the feature is ready, only the unit tests are missing. I just need to find the time to write them...

Does the demo looks good to you?

Thanks to this feature, you can display ticks at intermediate positions without setting a fixed step
@ValentinH ValentinH force-pushed the feature/show-ticks-at branch from e08422c to 76f1ef5 Compare April 22, 2016 06:36
@ValentinH ValentinH merged commit 82f406b into master Apr 22, 2016
@lookfirst
Copy link

Just integrated this into my app... thanks! screenshot: http://take.ms/RIYCH

@ValentinH
Copy link
Member Author

Great! :)

@ValentinH ValentinH deleted the feature/show-ticks-at branch June 4, 2016 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants